<%@ Page Language="vb" AutoEventWireup="false" CodeFile="~/ClientAPI/CallbackWithElements.aspx.vb" Inherits="CallbackWithElements" MasterPageFile="~/MasterPage.master"%>
<asp:content id="header" contentplaceholderid="HeaderPlaceHolder" runat="Server">
    <script language="javascript">
    <!--
    function successFunc(result, ctx)
    {
	    alert('result: ' + result + '\ncontext:' + ctx.id);
    }

    function errorFunc(result, ctx)
    {
	    alert(result);
    }

    function setVar()
    {
	    dnn.setVar('myvar', $('txt2').value);
    }
    //-->
    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<P class="sampledescription">
			This sample demonstrates that callbacks can pass any form value as an argument, including variables set through setVar.
			Upon completion an alert box shows the results.
		</p>
			<input type="text" id="txt" name="txt" runat="server">
			<br>
			<select id="cbo" runat="server">
				<option value="1" selected>1</option>
				<option value="2">2</option>
			</select>
			<br>
			<textarea id="ta" runat="server"></textarea>
			<br>
			<input id="chk" type="checkbox" value="itischecked" runat="server">
			<hr>
			<input type="button" runat="server" name="btn" value="Do Callback" id="Button1">
			<hr>
			<input type="button" name="btnSetVar" value="SetVar" id="btnSetVar" onclick="setVar()"><input type="text" id="txt2" name="txt2">
</asp:Content>